KRNL_INCS_ROOT := core/kernel/h
KRNL_SRCS_ROOT := core/kernel/src

KRNL_INCS := $(KRNL_INCS_ROOT)/device \
			$(KRNL_INCS_ROOT)/driver \
			$(KRNL_INCS_ROOT)/intrpt \
			$(KRNL_INCS_ROOT)/mem \
			$(KRNL_INCS_ROOT)/obj \
			$(KRNL_INCS_ROOT)/sem \
			$(KRNL_INCS_ROOT)/services \
			$(KRNL_INCS_ROOT)/task \
			$(KRNL_INCS_ROOT)/time 
KRNL_SRCS := $(KRNL_SRCS_ROOT)/base \
			$(KRNL_SRCS_ROOT)/device \
			$(KRNL_SRCS_ROOT)/intrpt \
			$(KRNL_SRCS_ROOT)/mem \
			$(KRNL_SRCS_ROOT)/obj \
			$(KRNL_SRCS_ROOT)/sem \
			$(KRNL_SRCS_ROOT)/time \
			$(KRNL_SRCS_ROOT)/multicore \
			$(KRNL_SRCS_ROOT)/services

KRNL_ALL_INCS := $(KRNL_INCS_ROOT) \
				$(KRNL_INCS)
KRNL_ALL_SRCS := $(KRNL_SRCS_ROOT) \
				$(KRNL_SRCS)

INC_DIRS := $(KRNL_ALL_INCS)
SRC_DIRS := $(KRNL_ALL_SRCS)

H_FILES := $(patsubst %, -I %, $(INC_DIRS))
S_FILES := $(SRC_DIRS)
C_FILES := $(SRC_DIRS)

CCBUILD_PATH = $(S_FILES) $(C_FILES)
HEADFILE_PATH = $(H_FILES)

include buildcmd.mki
include buildobjs.mki

# 目标依赖关系
.PHONY : all everything build_bsp

all : build_bsp
build_bsp : everything
everything : $(BUILD_MK_KRNL_OBJS)

include buildrule.mki